import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LoginComponent } from './components/login/login.component';
import { MessageComponent } from './components/message/message.component';
import { ChooseComponent } from './components/choose/choose.component';
import { IndexComponent } from './components/index/index.component';
import { GameComponent } from './components/game/game.component';
import { PersonalCenterComponent } from './components/personal-center/personal-center.component';


const routes: Routes = [
  {
    path: 'login',
    component: LoginComponent
  },
  {
    path: 'index',
    component: IndexComponent
  }, {
    path: 'mes',
    component: MessageComponent
  },
  {
    path: 'choose',
    component: ChooseComponent
  },
  {
    path: 'game',
    component: GameComponent
  },
  {
    path: 'personal-center',
    component: PersonalCenterComponent
  },
  {
    path: '**',
    component: LoginComponent
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
